import MenuView from '@/layouts/MenuView'
// import RouteView from '@/layouts/RouteView'
// import PageView from '@/layouts/PageView'

import TestRoutes from './testRoutes'

import Login from '@/views/login'
import Home from '@/views/home'

const routes = [
  {
    path: '/home',
    component: Home,
    name: '幻熊科技',
    icon: 'home'
  }
]

const constantRouterMap = [
  {
    path: '/',
    name: '首页',
    redirect: '幻熊科技',
    component: MenuView,
    children: routes
  },
  {
    path: '/login',
    name: '登录页',
    component: Login,
    invisible: true
  },
  {
    path: '*',
    redirect: { name: '幻熊科技' }
  }
]

const isDev = process.env.NODE_ENV === 'development'

if (isDev) {
  constantRouterMap[0].children.push(...TestRoutes)
}

export default constantRouterMap
